<extend name="Public:base" />

<block name="content">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-th-list"></em> 
            {$type} 
            <span class="xyh-pos">
                <i class="glyphicon glyphicon-log-out"></i>
                <if condition='ACTION_NAME eq "index"'>
                    <foreach name='poscate' item='v'>
                    <a href="{:U('' . ucfirst($v['tablename']) .'/index', array('pid' => $v['id']))}">{$v.name} </a> <em class="glyphicon glyphicon-menu-right"></em> 
                    </foreach>
                </if>
            </span>         
            </h3>
            
        </div>
        
    </div>
	
    <form action="" method="post" id="form_do" name="form_do">
    <div class="row margin-botton">
        <div class="col-sm-6 column">
            <div class="btn-group btn-group-md">
                <button class="btn btn-primary" type="button" onclick="doGoBatch('{:U('addlist', array('pid'=>$pid))}')"><em class="glyphicon glyphicon-plus-sign"></em> 批量入库</button>
                 <button class="btn btn-default" type="button" onclick="doConfirmBatch('{:U('clear', array('batchFlag' => 1, 'pid' => $pid))}', '确实要彻底删除选择项吗？')"><em class="glyphicon glyphicon-remove-circle"></em> 彻底删除</button> 

            </div>
        </div>
        <div class="col-sm-6 text-right">
            选择栏目 <select name="cid" >
                        <option value="0">请选择</option>
                        <foreach name='cate' item='v'>
                        <option value="{$v.id}">{$v.delimiter}{$v.name}</option>
                        </foreach>
                    </select>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            
            <div class="table-responsive">
                <table class="table table-hover xyh-table-bordered-out">
                    <thead>
                        <tr class="active">
                            <th><input type="checkbox" id="check"></th>
                            <th>编号</th>
                            <th width="430">标题</th>
                            <th>分类</th>
                            <th>发布人</th>
                            <th>采集时间</th>
                            <th class="text-right">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    <foreach name='vlist' item='v'>
                    <tr>
                        <td><input type="checkbox" name="key[]" value="{$v.id}"></td>
                        <td>{$v.id}</td>
                        <td class="aleft" style="color:{$v.color}">{$v.title}<if condition="$v.flag gt 0"><span style="color:#079B04;">[{$v.flag|flag2Str}]</span></if></td>
                        <td>{$v.catename}</td>
                        <td>{$v.author}</td>
                        <td>{$v.publishtime|date='Y-m-d H:i:s', ###}</td>
                        <td class="text-right">
                        <a href="{:U('edit',array('id' => $v['id'],'pid' => $v['cid']), '')}" class="label label-success">编辑</a>
                        <a href="javascript:;" onclick="toConfirm('{:U('clear',array('id' => $v['id'], 'pid' => $v['cid']), '')}', '确实要彻底删除吗？')" class="label label-danger">删除</a>
                        </td>
                    </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
                
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <div class="xyh-page">
                        {$page}
                    </div>
                </div>
            </div>

            
        </div>
    </div>
	</form>
    
</block>